Component({
    properties: {
        datas: {
            type: null
        }
    },
    data: {},
    observers: {
        datas: function(t) {
            var e = this;
            if (console.log(t), 3 == t.project_shell_type) {
                console.log("".concat(t.lock_update_at, "000"));
                var a = Number("".concat(t.lock_update_at, "000")), o = e.formatDate(a);
                this.data.timeOver = setInterval(function() {
                    var t = new Date().getTime();
                    e._countDown(a, t);
                }, 1e3), e.setData({
                    nowtime: o
                }), console.log(o);
            }
        }
    },
    methods: {
        _countDown: function(t, e) {
            if (t - e < 0) return clearInterval(this.data.timeOver), void this.setData({
                lastTime: "0"
            });
            var a = (t - e) / 1e3, o = parseInt(a / 86400), n = parseInt(a % 86400 / 3600), s = parseInt(a % 86400 % 3600 / 60), r = parseInt(a % 86400 % 3600 % 60), i = {
                day: this._timeFormat(o),
                hou: this._timeFormat(n),
                min: this._timeFormat(s),
                sec: this._timeFormat(r)
            };
            this.setData({
                lastTime: "".concat(i.day, "天").concat(i.hou, "时").concat(i.min, "分").concat(i.sec, "秒")
            });
        },
        _timeFormat: function(t) {
            return t < 10 ? "0" + t : t;
        },
        formatDate: function(t) {
            return console.log(t), t.getFullYear() + "-" + ((t.getMonth() + 1 < 10 ? "0" + (t.getMonth() + 1) : t.getMonth() + 1) + "-") + (t.getDate() < 10 ? "0" + t.getDate() : t.getDate()) + " " + ((t.getHours() < 10 ? "0" + t.getHours() : t.getHours()) + ":") + ((t.getMinutes() < 10 ? "0" + t.getMinutes() : t.getMinutes()) + ":") + (t.getSeconds() < 10 ? "0" + t.getSeconds() : t.getSeconds());
        }
    }
});